package com.kang.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;

/**
 * @Author 吃三明治派对中的康康
 * @Date 2022/5/5 9:33
 * @Version 1.0
 */
@Controller
public class UserCenterController {

    //个人中心
    @RequestMapping("/toUserCenter")
    public String toUserCenter(HttpServletRequest request){
        if(request.getSession().getAttribute("UserSession") != null)
        return "userCenter";
        else return "redirect:/toLogin";
    }
}
